import React from 'react';
import styles from './GoodsPaggerItem.css';

function GoodsPaggerItem(props) {
  let {curPage,dispatch,statecurPage}=props
  return (
    <span className={curPage===statecurPage ? styles.cur:styles.normal} onClick={()=>{
      dispatch({type:'goods/page',curPage:curPage})}}>
      {props.children}

    </span>
  );
}

export default GoodsPaggerItem;
